<%-- 
    Document   : show-mobilephone-detail
    Created on : 06-05-2011, 08:55:49
    Author     : DoanHa
--%>

<%@page import="com.vienthonga.product.logic.M_Detail"%>
<%@page import="com.vienthona.common.utils.ProductUtils"%>
<%@page import="java.text.DecimalFormat"%>
<%@page import="com.vienthonga.hibernate.pojo.TProduct"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib uri="http://struts.apache.org/tags-bean" prefix="bean"%>
<%@taglib uri="http://struts.apache.org/tags-html" prefix="html"%>
<%@taglib uri="http://struts.apache.org/tags-logic" prefix="logic"%>

<%
            TProduct product = (TProduct) request.getAttribute("product");
            M_Detail mobileDetail = (M_Detail) request.getAttribute("productDetails");
%>

<div id="content">
    <div class="box_2">
        <div class="header Boxtitle_2">
            <span><center><b>Chi Tiết Sản Phẩm</b></center>
            </span>
        </div>
        <div class="content">
            <div class="childContent">
                <div id="ChiTietSanPham_image">
                    <img src="<bean:write name="product" property="PPhotos"/>" alt="<bean:write name="product" property="PName"/>">
                </div>
                <div id="ChiTietSanPham_Content">
                    <p>
                        <span class="titleChitiet"><bean:write name="product" property="PName"/></span>
                        <br>
                        Giá:
                        <span class="detail_price"><strong><bean:write name="product" property="PUnitPrice" format="##,###,###"/> VNĐ</strong></span><br>
                        <img src="images/05ostars.gif">
                    </p>
                    <p></p>

                    <span class="chitietChucNang">Bộ Bán Hàng Tiêu Chuẩn:</span><br>
                    <br>

                    <span class="body_ChiTiet">Thân máy, pin, sạc, tai nghe, cáp, thẻ nhớ 4GB, 1 nắp lưng, sách hướng dẫn</span>

                    <p>
                        <span class="chitietChucNang">Thời gian bảo hành: <bean:write name="product" property="PWarrantyPeriod"/> tháng</span>
                    </p>

                    <p class="chitietChucNang">Thông Tin Khuyến Mãi:</p>
                    <p> <bean:write name="product" property="PPromotionsInfo"/></p>
                    <div>

                        <div class="button" style="float:left; margin-right:5px;">
                            <center><b><a href="#"> Đặt Mua Online</a></b> </center>
                        </div>


                        <div class="button" style="float:left; margin-right:5px; ">
                            <center><b><a href="#"> So Sánh</a></b> </center>
                        </div>


                        <div class="button" style="float: left">
                            <center><b><a href="#"> Giới thiệu Bạn Bè</a></b> </center>
                        </div>

                    </div>
                </div>
            </div>
        </div>
        <br>
        <br>
        <div style="margin-left:5px">
            <logic:notEmpty name="productDetails">
                <table cellspacing="0" cellpadding="0" border="0" width="585">
                    <tbody>
                        <tr>
                            <td>
                                <div id="list_area">
                                    <div class="list_tabs">
                                        <div><a onclick="showlist(1);" href="javascript:" class="down" id="tab1">Thông Tin Chi Tiết</a></div>
                                        <div><a onclick="showlist(2);" href="javascript:" id="tab2" class="">Tính Năng Điện Thoại</a></div>
                                        <div><a onclick="showlist(3);" href="javascript:" id="tab3" class="">Nhận Xét</a></div>
                                        <br class="list_clear">
                                    </div>
                                    <div class="list_content">
                                        <div id="list_area_1" style="">
                                            <br/>
                                            <span style="font-weight: bold;"><bean:write name="product" property="PName"/></span>
                                            <br>
                                            <br>
                                            <img hspace="0" border="0" align="bottom" vspace="0" src="<%= ProductUtils.getImagePath(product.getPPhotos(), 1)%>" alt=" ">

                                        </div>

                                        <div id="list_area_2" style="display: none;">
                                            <br>
                                            <table cellspacing="0" cellpadding="0" border="1" width="100%" style="border-collapse: collapse" >
                                                <tbody>
                                                    <tr>
                                                        <td colspan="2">&nbsp;</td>
                                                    </tr>
                                                    <tr>
                                                        <td width="130" valign="top"><span><strong>Tổng quan</strong></span></td>
                                                        <td>
                                                            <table cellspacing="0" cellpadding="5" border="0" width="100%" style="border-collapse: collapse">
                                                                <tbody>
                                                                    <tr>
                                                                        <td class="borderLRTop">Mạng: </td>
                                                                        <td class="borderCellTop">
                                                                            <bean:write name="productDetails" property="general.network" />

                                                                        </td>
                                                                    </tr>
                                                                    <tr>
                                                                        <td class="borderLRTop">Màu sắc: </td>
                                                                        <td class="borderCellTop"><bean:write name="productDetails" property="general.color" /></td>
                                                                    </tr>

                                                                    <tr>
                                                                        <td width="144" class="borderLRTop">Kích thước/Trọng lượng </td>
                                                                        <td class="borderCellTop"><bean:write name="productDetails" property="general.size" />/<bean:write name="productDetails" property="general.weight" /></td>
                                                                    </tr>
                                                                </tbody>
                                                            </table>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td colspan="2">&nbsp;</td>
                                                    </tr>
                                                    <tr>
                                                        <td valign="top"><span><strong>Hiển thị </strong></span></td>
                                                        <td>
                                                            <table cellspacing="0" cellpadding="5" border="0" width="100%">
                                                                <tbody>
                                                                    <tr>
                                                                        <td width="144" class="borderLRTop">Ngôn ngữ </td>
                                                                        <td class="borderCellTop"><bean:write name="productDetails" property="display.language" /></td>
                                                                    </tr>
                                                                    <tr>
                                                                        <td class="borderLRTop">Loại màn hình: </td>
                                                                        <td class="borderCellTop"><bean:write name="productDetails" property="display.displayType" /></td>
                                                                    </tr>
                                                                    <tr>
                                                                        <td class="borderLRTop">Kích thước hiển thị:</td>
                                                                        <td class="borderCellTop"><bean:write name="productDetails" property="display.displaySize" />  </td>

                                                                    </tr>
                                                                </tbody>
                                                            </table>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td colspan="2">&nbsp;</td>
                                                    </tr>
                                                    <tr>
                                                        <td valign="top"><span ><strong>Đặc điểm</strong></span></td>
                                                        <td>
                                                            <table cellspacing="0" cellpadding="5" border="0" width="100%">
                                                                <tbody>
                                                                    <tr>
                                                                        <td width="144" class="borderLRTop"  >Kiểu chuông: </td>
                                                                        <td class="borderCellTop"><bean:write name="productDetails" property="features.ring" /></td>
                                                                    </tr>
                                                                    <tr>
                                                                        <td class="borderLRTop">Tin nhắn:</td>
                                                                        <td class="borderCellTop"><bean:write name="productDetails" property="features.message" /></td>
                                                                    </tr>
                                                                    <tr>
                                                                        <td class="borderLRTop">Kết nối:</td>
                                                                        <td class="borderCellTop"><bean:write name="productDetails" property="features.connectionMedia" /></td>
                                                                    </tr>
                                                                    <tr>
                                                                        <td class="borderFull">Camera:</td>
                                                                        <td class="borderCellTopBottom"><bean:write name="productDetails" property="features.camera" /></td>
                                                                    </tr>
                                                                </tbody>
                                                            </table>
                                                        </td>
                                                    </tr>

                                                    <tr>
                                                        <td valign="top"><span class="CellPaddingLeft chitietTinhNang"><strong>Lưu trữ:</strong></span></td>
                                                        <td><table cellspacing="0" cellpadding="5" border="0" width="100%">
                                                                <tbody><tr>
                                                                        <td width="144" class="borderLRTop">Danh bạ: </td>
                                                                        <td class="borderCellTop"><bean:write name="productDetails" property="storage.contact" /></td>

                                                                    </tr>
                                                                    <tr>
                                                                        <td class="borderLRTop">Bộ nhớ trong </td>
                                                                        <td class="borderCellTop"><bean:write name="productDetails" property="storage.internalMemory" /></td>

                                                                    </tr>
                                                                    <tr>
                                                                        <td class="borderFull">Thẻ nhớ:</td>
                                                                        <td class="borderCellTopBottom"><bean:write name="productDetails" property="storage.externalMemory" /></td>

                                                                    </tr>
                                                                </tbody></table></td>
                                                    </tr>
                                                    <tr>
                                                        <td colspan="2">&nbsp;</td>
                                                    </tr>

                                                    <tr>
                                                        <td valign="top"><span class="CellPaddingLeft chitietTinhNang"><strong>Thông tin khác</strong></span></td>
                                                        <td><table cellspacing="0" cellpadding="5" border="0" width="100%">
                                                                <tbody><tr>
                                                                        <td width="144" class="borderLRTop">Tải nhạc:</td>
                                                                        <td class="borderCellTop"><bean:write name="productDetails" property="orthers.musicDownload" /></td>
                                                                    </tr>
                                                                    <tr>
                                                                        <td class="borderLRTop">Rung:</td>
                                                                        <td class="borderCellTop"><bean:write name="productDetails" property="orthers.ring_2" /></td>
                                                                    </tr>
                                                                    <tr>
                                                                        <td class="borderLRTop">GPRS:</td>
                                                                        <td class="borderCellTop"><bean:write name="productDetails" property="orthers.gprs" /></td>
                                                                    </tr>
                                                                    <tr>
                                                                        <td class="borderLRTop">HSCSD:</td>
                                                                        <td class="borderCellTop"><bean:write name="productDetails" property="orthers.hscsd" /></td>
                                                                    </tr>
                                                                    <tr>
                                                                        <td class="borderLRTop">EDGE:</td>
                                                                        <td class="borderCellTop"><bean:write name="productDetails" property="orthers.edge" /></td>
                                                                    </tr>
                                                                    <tr>
                                                                        <td class="borderLRTop">3G:</td>
                                                                        <td class="borderCellTop"><bean:write name="productDetails" property="orthers.network_3g" /></td>
                                                                    </tr>
                                                                    <tr>
                                                                        <td class="borderLRTop">WLAN:</td>
                                                                        <td class="borderCellTop"><bean:write name="productDetails" property="orthers.wlan" /></td>
                                                                    </tr>
                                                                    <tr>
                                                                        <td class="borderLRTop">Hệ điều hành:</td>
                                                                        <td class="borderCellTop"><bean:write name="productDetails" property="orthers.os" /></td>
                                                                    </tr>

                                                                    <tr>
                                                                        <td class="borderLRTop">Đồng hồ:</td>
                                                                        <td class="borderCellTop"> <bean:write name="productDetails" property="orthers.clock" /></td>
                                                                    </tr>
                                                                    <tr>
                                                                        <td class="borderLRTop">Báo thức:</td>
                                                                        <td class="borderCellTop"><bean:write name="productDetails" property="orthers.alarm" /></td>
                                                                    </tr>
                                                                    <tr>
                                                                        <td class="borderLRTop">Đài FM:</td>
                                                                        <td class="borderCellTop"> <bean:write name="productDetails" property="orthers.fm" /></td>
                                                                    </tr>
                                                                    <tr>
                                                                        <td class="borderLRTop">Trò chơi:</td>
                                                                        <td class="borderCellTop"> <bean:write name="productDetails" property="orthers.game" /></td>
                                                                    </tr>
                                                                    <tr>
                                                                        <td class="borderLRTop">Trình duyệt:</td>
                                                                        <td class="borderCellTop"><bean:write name="productDetails" property="orthers.browser" /></td>
                                                                    </tr>
                                                                    <tr>
                                                                        <td class="borderLRTop">Java:</td>
                                                                        <td class="borderCellTop"><bean:write name="productDetails" property="orthers.java" /></td>
                                                                    </tr>

                                                                    <tr>
                                                                        <td class="borderLRTop">Quay phim:</td>
                                                                        <td class="borderCellTop"><bean:write name="productDetails" property="orthers.videoRecorder" /></td>
                                                                    </tr>
                                                                    <tr>
                                                                        <td class="borderLRTop">Ghi âm:</td>
                                                                        <td class="borderCellTop"><bean:write name="productDetails" property="orthers.voiceRecorder" /></td>
                                                                    </tr>
                                                                    <tr>
                                                                        <td class="borderLRTop">Nghe nhạc:</td>
                                                                        <td class="borderCellTop">M<bean:write name="productDetails" property="orthers.listeningMusic" /></td>
                                                                    </tr>
                                                                    <tr>
                                                                        <td class="borderLRTop">Xem phim:</td>
                                                                        <td class="borderCellTop"><bean:write name="productDetails" property="orthers.watchingVideo" /> </td>
                                                                    </tr>
                                                                    <tr>
                                                                        <td class="borderLRTop">Ghi âm cuộc gọi:</td>
                                                                        <td class="borderCellTop"><bean:write name="productDetails" property="orthers.callRecorder" /></td>
                                                                    </tr>
                                                                    <tr>
                                                                        <td class="borderFull">Loa ngoài:</td>

                                                                        <td class="borderCellTopBottom"> <bean:write name="productDetails" property="orthers.externalSpeaker" /></td>
                                                                    </tr>
                                                                </tbody></table></td>
                                                    </tr>
                                                    <tr>
                                                        <td colspan="2">&nbsp;</td>
                                                    </tr>

                                                    <tr>
                                                        <td valign="top"><span class="CellPaddingLeft chitietTinhNang"><strong>Pin</strong></span></td>
                                                        <td><table cellspacing="0" cellpadding="5" border="0" width="100%">
                                                                <tbody><tr>
                                                                        <td width="144" class="borderLRTop">Loại Pin: </td>
                                                                        <td class="borderCellTop"><bean:write name="productDetails" property="general.pin" /></td>
                                                                    </tr>
                                                                    <tr>
                                                                        <td class="borderLRTop">Thời gian chờ: </td>
                                                                        <td class="borderCellTop"><bean:write name="productDetails" property="orthers.waitingTime" /></td>
                                                                    </tr>
                                                                    <tr>
                                                                        <td class="borderFull">Thời gian đàm thoại:</td>
                                                                        <td class="borderCellTopBottom"><bean:write name="productDetails" property="orthers.talkingTime" /></td>
                                                                    </tr>

                                                                </tbody></table></td>
                                                    </tr>
                                                    <tr>
                                                        <td colspan="2">&nbsp;</td>
                                                    </tr>
                                                    <tr>
                                                        <td valign="top"><span class="CellPaddingLeft chitietTinhNang"><strong>Mô tả:</strong></span></td>
                                                        <td valign="top"><table cellspacing="0" cellpadding="5" border="0" width="100%">
                                                                <tbody><tr>
                                                                        <td class="borderTopLB">
										<bean:write name="productDetails" property="description" />

                                                                        </td>
                                                                    </tr>
                                                                </tbody></table></td>
                                                    </tr>
                                                    <tr>
                                                        <td colspan="2">&nbsp;</td>
                                                    </tr>
                                                </tbody>
                                            </table>
                                        </logic:notEmpty>
                                    </div>

                                    <div id="list_area_3" style="display: none;">
                                        <br>
                                        Chưa có nhận xét nào
                                    </div>

                                </div>

                            </div>
                        </td>
                    </tr>
                </tbody>
            </table>


        </div>
    </div>
</div>

<script type="text/javascript" language="javascript">
    function hidelist()
    {
        document.getElementById("list_area_1").style.display= 'none';
        document.getElementById("list_area_2").style.display= 'none';
        document.getElementById("list_area_3").style.display= 'none';

        document.getElementById('tab1').className='';
        document.getElementById('tab2').className='';
        document.getElementById('tab3').className='';

    }

    function showlist(id)
    {
        hidelist();
        document.getElementById("list_area_" + id).style.display='';
        document.getElementById('tab' + id).className='down';
    }
    showlist(1);
</script>
